<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Liste des notifications</title>

 <script src="jquery.js"></script>
 <script src="pure.js"></script>
 <script src="md5.js"></script>
 
    
<link href="default.css" rel="stylesheet" type="text/css" />
</head>

<body>
<h1>Messages notifies</h1>
<div class="logoEnssat">
	<img src="http://intranet.enssat.fr/logo/img/logoEnssat--20100318.png" width="210" height="85"/>
</div>
<ul class="notifications">
</ul>

<div class="refresh">
	<input type="button" name="toto" value="refresh" onclick="refresh()" />
</div>

<script language="javascript">

var directive = {
	      'li':{
	        'post<-allPost':{
	          'b':'post.realName',
	          'i':'post.content',
	          'input[name="ident"]@value+':'post.id',
	          '.form@name':function(arg){
	        		return "monform"+arg.post.item.id;
	          },
			  'img@src+':function(arg){ 
	               return 'http://www.gravatar.com/avatar/'+md5($.trim((''+arg.post.item.email).toLowerCase()))+'?s=80';
			  }
	         }
	      }
	    };

 
 var refresh = function () {
	 
	$.getJSON("service/notif", function( data ) {
		$('ul.notifications').html('<li><form class="form" name="" method="post" action="service/post/suppPost"><img width="20px" height="20px" src="" /> <b>test</b> <BR /><i>message </i> <input class="ident" name="ident" type="hidden" value=""/> <input type="submit" value="supprimer"/></form></li>');	
		$('ul.notifications').render(data, directive);
    } );	 	 
 };
 
 refresh();
	
</script>
	<div class="lien_pages">
		<a href="index.html"> Retour Accueil </a> 	
	</div>
</body>
</html>
